package mest.service.hank.impl;

import mest.dao.hank.plan_saleoutMapper;
import mest.dao.hank.plan_takematerialMapper;
import mest.entity.plan_saleout;
import mest.service.hank.PlanSaleoutService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Classname PlanSaleoutServiceImpl
 * @Description TODO
 * @Date 2019/12/6 15:44
 * @Created by 18416
 * @Auther: henk
 */
@Service
public class PlanSaleoutServiceImpl implements PlanSaleoutService {

    @Resource
    private plan_saleoutMapper psm;

    @Override
    public int deleteByPrimaryKey(Integer id,String theirDb) {
        return psm.deleteByPrimaryKey(id, theirDb);
    }

    @Override
    public int insert(plan_saleout record,String theirDb ) {
        return psm.insert(record, theirDb);
    }

    @Override
    public int insertSelective(plan_saleout record,String theirDb) {
        return psm.insertSelective(record, theirDb);
    }

    @Override
    public plan_saleout selectByPrimaryKey(Integer id,String theirDb) {
        return psm.selectByPrimaryKey(id, theirDb);
    }

    @Override
    public int updateByPrimaryKeySelective(Map<String, Object> map) {
        return psm.updateByPrimaryKeySelective(map);
    }

    @Override
    public int updateByPrimaryKey(plan_saleout record,String theirDb) {
        return psm.updateByPrimaryKey(record, theirDb);
    }

    @Override
    public int insertResult_id(Map<String, Object> map) {
    	
        psm.insertResult_id(map);
        //System.out.println("record.getId():"+map.get("id"));
        return Integer.valueOf(map.get("id")+"");
    }

    @Override
    public List<Map> queryAllModel(Integer index, Integer pageSize, String record, Integer state,String theirDb) {
        return psm.queryAllModel((index - 1) * pageSize, pageSize, record, state , theirDb);
    }

    @Override
    public int findCount(String record, Integer state,String theirDb) {
        return psm.findCount(record,state, theirDb);
    }

}
